import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import { setupStore } from '@/store/login/login'

import '@/assets/css/normalize.less'
import '@/assets/css/base-ui.less'
import { useElementPlus } from '@/global/element-plus'

import { useDict } from './utils/dict'

import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'

import Prism from 'prismjs'

VueMarkdownEditor.use(vuepressTheme, {
	Prism
})

const app = createApp(App)

app.config.globalProperties.$useDict = useDict

useElementPlus(app)
app.use(createPinia())
setupStore()
app.use(router)
app.use(VueMarkdownEditor)

app.mount('#app')
